<script type="text/javascript">
	$("li#menu3").addClass("current");
</script>
<table>	
	<tr>
		<th>ID</th>
		<th>Login</th>
		<th>Nom</th>
		<th>Pr&eacute;nom</th>
		<th>Role</th>
		<th>Mail</th>
	</tr>

<?php
foreach($usersList as $user)
{
	?>
	<form method='post' action='#'>
		<tr>
			<td> <?php echo $user->getIdUser()?></td>
			<td><?php echo $user->getLoginUser()?></td>
			<td> <?php echo $user->getNameUser()?></td>
			<td><?php echo $user->getFirstNameUser()?></td>
			<td>
				<select name="role">
					
				<?php
					foreach($rolesList as $role)
					{
						if($role->getIdRole()==$user->getIdRoleUser())
							echo "<option value='".$role->getIdRole()."' selected='selected'>".$role->getNameRole()."</option>";
						else
							echo "<option value='".$role->getIdRole()."' >".$role->getNameRole()."</option>";
					}		
				?>	
				
				</select>
			</td>
			<td><?php echo $user->getMailUser() ?></td>
			<td><input type='submit' value='Editer' name='edit'/></td>
			<td><input type='submit' value='Supprimer' name='suppr'/></td>
		</tr>
		<input type='hidden' name='idUser' value='<?php echo $user->getIdUser() ?>'/>
		</form>
	<?php
}
	
echo "</table>";
			

?>